import { createWebHistory, createRouter, RouteRecordRaw } from 'vue-router'

import one from '@/pages/home/one.vue'
import two from '@/pages/home/two.vue'
const routes: RouteRecordRaw[] = [
  {
    path: '/',
    component: () => import('@/components/Layout/index.vue'),
    redirect: '/one',
    name: 'home',
    children: [
      {
        path: '/one',
        component: one,
        name: 'one',
      },
      {
        path: '/two',
        component: two,
        name: 'two',
      },
    ],
  },
  {
    path: '/store',
    name: 'store',
    component: () => import('@/pages/one/UseStore.vue'),
  },
]
const router = createRouter({
  history: createWebHistory(),
  routes,
})
export default router
export { routes }
